package com.sxz.sbs.module.client.adapter;


import android.graphics.Color;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sxz.sbs.R;
import com.sxz.sbs.applibrary.component.LabelTextView;
import com.sxz.sbs.module.client.bean.StallRequireBean;

import java.util.List;

/**
 * @author tian
 * @date 2017/9/16
 * 车位需求类型
 */

public class StallTypeAdapter extends BaseQuickAdapter<StallRequireBean,BaseViewHolder> {

    public StallTypeAdapter(@Nullable List<StallRequireBean> data) {
        super(R.layout.item_stalltype,data);
    }



    @Override
    protected void convert(final BaseViewHolder helper, final StallRequireBean item) {
         LabelTextView rlBg = helper.getView(R.id.rely_screen_bg);
         rlBg.setText(item.getIntentWord());
        if (item.getIsSelect() == 1) {
            rlBg.setTextColor(Color.parseColor("#ffffff"));
            rlBg.setBackGround(Color.parseColor("#00a0e9"));
        } else {
            rlBg.setTextColor(Color.parseColor("#999999"));
            rlBg.setBackGround(Color.parseColor("#eeeeee"));
        }

    }

}
